package haitao.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import haitao.dao.IProductDao;
import haitao.model.Product;


@Controller
@RequestMapping("/mall/html/product")
public class MallProductController {
	
		
		@Resource
		private IProductDao productDao;
		
		//查询今日必抢
		@RequestMapping("/findToday.do")
		@ResponseBody
		public List<Product> findToday(){
			return productDao.findToday();
		}
		
		//查看商品详情
		@RequestMapping("/findById.do")
		@ResponseBody
		public Product findById(int id) {
			return productDao.findById(id);
		}
}
